public class text {
    public static int func(int n){

        if(n == 0){
            return 0;
        }else{
            return func(n/10)+n%10;
        }

    }
    public static void main(String[] args) {
        System.out.println(func(5555));
    }
    public static void main2(String[] args) {
        System.out.println(func1(10));
    }
    public static int func1(int n){
        if(n==1){
            return 1;
        }
        return n+func1(n-1);
    }
    public static void main1(String[] args) {
        int i = 1;
        while(i <= 100){
            if(i % 15 != 0){
                i++;
                continue;
            }
            System.out.print(i + " ");
            i++;
        }
    }
}
